package com.wn.class30.entity;

import java.util.ArrayList;
import java.util.List;

public class CuponExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Long offset;

    public CuponExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCuponIdIsNull() {
            addCriterion("cupon_id is null");
            return (Criteria) this;
        }

        public Criteria andCuponIdIsNotNull() {
            addCriterion("cupon_id is not null");
            return (Criteria) this;
        }

        public Criteria andCuponIdEqualTo(Integer value) {
            addCriterion("cupon_id =", value, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdNotEqualTo(Integer value) {
            addCriterion("cupon_id <>", value, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdGreaterThan(Integer value) {
            addCriterion("cupon_id >", value, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("cupon_id >=", value, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdLessThan(Integer value) {
            addCriterion("cupon_id <", value, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdLessThanOrEqualTo(Integer value) {
            addCriterion("cupon_id <=", value, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdIn(List<Integer> values) {
            addCriterion("cupon_id in", values, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdNotIn(List<Integer> values) {
            addCriterion("cupon_id not in", values, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdBetween(Integer value1, Integer value2) {
            addCriterion("cupon_id between", value1, value2, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponIdNotBetween(Integer value1, Integer value2) {
            addCriterion("cupon_id not between", value1, value2, "cuponId");
            return (Criteria) this;
        }

        public Criteria andCuponNameIsNull() {
            addCriterion("cupon_name is null");
            return (Criteria) this;
        }

        public Criteria andCuponNameIsNotNull() {
            addCriterion("cupon_name is not null");
            return (Criteria) this;
        }

        public Criteria andCuponNameEqualTo(String value) {
            addCriterion("cupon_name =", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameNotEqualTo(String value) {
            addCriterion("cupon_name <>", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameGreaterThan(String value) {
            addCriterion("cupon_name >", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameGreaterThanOrEqualTo(String value) {
            addCriterion("cupon_name >=", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameLessThan(String value) {
            addCriterion("cupon_name <", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameLessThanOrEqualTo(String value) {
            addCriterion("cupon_name <=", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameLike(String value) {
            addCriterion("cupon_name like", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameNotLike(String value) {
            addCriterion("cupon_name not like", value, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameIn(List<String> values) {
            addCriterion("cupon_name in", values, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameNotIn(List<String> values) {
            addCriterion("cupon_name not in", values, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameBetween(String value1, String value2) {
            addCriterion("cupon_name between", value1, value2, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponNameNotBetween(String value1, String value2) {
            addCriterion("cupon_name not between", value1, value2, "cuponName");
            return (Criteria) this;
        }

        public Criteria andCuponContentIsNull() {
            addCriterion("cupon_content is null");
            return (Criteria) this;
        }

        public Criteria andCuponContentIsNotNull() {
            addCriterion("cupon_content is not null");
            return (Criteria) this;
        }

        public Criteria andCuponContentEqualTo(String value) {
            addCriterion("cupon_content =", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentNotEqualTo(String value) {
            addCriterion("cupon_content <>", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentGreaterThan(String value) {
            addCriterion("cupon_content >", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentGreaterThanOrEqualTo(String value) {
            addCriterion("cupon_content >=", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentLessThan(String value) {
            addCriterion("cupon_content <", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentLessThanOrEqualTo(String value) {
            addCriterion("cupon_content <=", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentLike(String value) {
            addCriterion("cupon_content like", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentNotLike(String value) {
            addCriterion("cupon_content not like", value, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentIn(List<String> values) {
            addCriterion("cupon_content in", values, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentNotIn(List<String> values) {
            addCriterion("cupon_content not in", values, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentBetween(String value1, String value2) {
            addCriterion("cupon_content between", value1, value2, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponContentNotBetween(String value1, String value2) {
            addCriterion("cupon_content not between", value1, value2, "cuponContent");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyIsNull() {
            addCriterion("cupon_money is null");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyIsNotNull() {
            addCriterion("cupon_money is not null");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyEqualTo(Double value) {
            addCriterion("cupon_money =", value, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyNotEqualTo(Double value) {
            addCriterion("cupon_money <>", value, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyGreaterThan(Double value) {
            addCriterion("cupon_money >", value, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyGreaterThanOrEqualTo(Double value) {
            addCriterion("cupon_money >=", value, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyLessThan(Double value) {
            addCriterion("cupon_money <", value, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyLessThanOrEqualTo(Double value) {
            addCriterion("cupon_money <=", value, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyIn(List<Double> values) {
            addCriterion("cupon_money in", values, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyNotIn(List<Double> values) {
            addCriterion("cupon_money not in", values, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyBetween(Double value1, Double value2) {
            addCriterion("cupon_money between", value1, value2, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponMoneyNotBetween(Double value1, Double value2) {
            addCriterion("cupon_money not between", value1, value2, "cuponMoney");
            return (Criteria) this;
        }

        public Criteria andCuponRangeIsNull() {
            addCriterion("cupon_range is null");
            return (Criteria) this;
        }

        public Criteria andCuponRangeIsNotNull() {
            addCriterion("cupon_range is not null");
            return (Criteria) this;
        }

        public Criteria andCuponRangeEqualTo(String value) {
            addCriterion("cupon_range =", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeNotEqualTo(String value) {
            addCriterion("cupon_range <>", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeGreaterThan(String value) {
            addCriterion("cupon_range >", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeGreaterThanOrEqualTo(String value) {
            addCriterion("cupon_range >=", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeLessThan(String value) {
            addCriterion("cupon_range <", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeLessThanOrEqualTo(String value) {
            addCriterion("cupon_range <=", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeLike(String value) {
            addCriterion("cupon_range like", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeNotLike(String value) {
            addCriterion("cupon_range not like", value, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeIn(List<String> values) {
            addCriterion("cupon_range in", values, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeNotIn(List<String> values) {
            addCriterion("cupon_range not in", values, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeBetween(String value1, String value2) {
            addCriterion("cupon_range between", value1, value2, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCuponRangeNotBetween(String value1, String value2) {
            addCriterion("cupon_range not between", value1, value2, "cuponRange");
            return (Criteria) this;
        }

        public Criteria andCouponNumIsNull() {
            addCriterion("coupon_num is null");
            return (Criteria) this;
        }

        public Criteria andCouponNumIsNotNull() {
            addCriterion("coupon_num is not null");
            return (Criteria) this;
        }

        public Criteria andCouponNumEqualTo(Integer value) {
            addCriterion("coupon_num =", value, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumNotEqualTo(Integer value) {
            addCriterion("coupon_num <>", value, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumGreaterThan(Integer value) {
            addCriterion("coupon_num >", value, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("coupon_num >=", value, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumLessThan(Integer value) {
            addCriterion("coupon_num <", value, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumLessThanOrEqualTo(Integer value) {
            addCriterion("coupon_num <=", value, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumIn(List<Integer> values) {
            addCriterion("coupon_num in", values, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumNotIn(List<Integer> values) {
            addCriterion("coupon_num not in", values, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumBetween(Integer value1, Integer value2) {
            addCriterion("coupon_num between", value1, value2, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCouponNumNotBetween(Integer value1, Integer value2) {
            addCriterion("coupon_num not between", value1, value2, "couponNum");
            return (Criteria) this;
        }

        public Criteria andCuponStatusIsNull() {
            addCriterion("cupon_status is null");
            return (Criteria) this;
        }

        public Criteria andCuponStatusIsNotNull() {
            addCriterion("cupon_status is not null");
            return (Criteria) this;
        }

        public Criteria andCuponStatusEqualTo(Integer value) {
            addCriterion("cupon_status =", value, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusNotEqualTo(Integer value) {
            addCriterion("cupon_status <>", value, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusGreaterThan(Integer value) {
            addCriterion("cupon_status >", value, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("cupon_status >=", value, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusLessThan(Integer value) {
            addCriterion("cupon_status <", value, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusLessThanOrEqualTo(Integer value) {
            addCriterion("cupon_status <=", value, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusIn(List<Integer> values) {
            addCriterion("cupon_status in", values, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusNotIn(List<Integer> values) {
            addCriterion("cupon_status not in", values, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusBetween(Integer value1, Integer value2) {
            addCriterion("cupon_status between", value1, value2, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("cupon_status not between", value1, value2, "cuponStatus");
            return (Criteria) this;
        }

        public Criteria andCuponUrlIsNull() {
            addCriterion("cupon_url is null");
            return (Criteria) this;
        }

        public Criteria andCuponUrlIsNotNull() {
            addCriterion("cupon_url is not null");
            return (Criteria) this;
        }

        public Criteria andCuponUrlEqualTo(String value) {
            addCriterion("cupon_url =", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlNotEqualTo(String value) {
            addCriterion("cupon_url <>", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlGreaterThan(String value) {
            addCriterion("cupon_url >", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlGreaterThanOrEqualTo(String value) {
            addCriterion("cupon_url >=", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlLessThan(String value) {
            addCriterion("cupon_url <", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlLessThanOrEqualTo(String value) {
            addCriterion("cupon_url <=", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlLike(String value) {
            addCriterion("cupon_url like", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlNotLike(String value) {
            addCriterion("cupon_url not like", value, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlIn(List<String> values) {
            addCriterion("cupon_url in", values, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlNotIn(List<String> values) {
            addCriterion("cupon_url not in", values, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlBetween(String value1, String value2) {
            addCriterion("cupon_url between", value1, value2, "cuponUrl");
            return (Criteria) this;
        }

        public Criteria andCuponUrlNotBetween(String value1, String value2) {
            addCriterion("cupon_url not between", value1, value2, "cuponUrl");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}